package cn.cloud.all.security.oauth2.provider;

import cn.cloud.all.security.core.GrantedAuthority;

import java.util.Set;

/**
 * Strategy for accessing useful information about the current security context.
 *
 * @author Dave Syer
 */
public interface SecurityContextAccessor {

    /**
     * @return true if the current context represents a user
     */
    boolean isUser();

    /**
     * Get the current granted authorities (never null)
     */
    Set<GrantedAuthority> getAuthorities();

}
